interface LabelInValue {
  label?: string;
  value?: number;
}

export class Role {
  id?: number;
  roleName = '';
  remark = '';
  rules = []
  deptName?: string;
  status = true
  constructor(data?: Role) {
    data && this.setProps(data);
  }

  setProps(data: Role) {
    (Object.keys(this) as Array<keyof IRole>).forEach((key) => {
      // @ts-ignore
      this[key] = data[key]
    })
  }
}

export type IRole = Omit<Role, 'setProps'>